<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据类型</title>
</head>
<body>
<h1 style="color:#0ff">数据类型</h1>
<script type="text/javascript">
    var age = 20;
    var nickName = "zhangsan";
    var result = true;
    var teshu = undefined;//声明但未赋值就默认是undefined
    var kong = null;
    //判断数据类型
    console.log(typeof age);
    console.log(typeof (nickName));
    console.log(typeof result);
    console.log(typeof teshu );
    console.log(typeof kong);
</script>
</body>
</html>